public class Test1 {

    public static void main(String[] args) {

        BinaryTree binaryTree=new BinaryTree();
        BinaryTree.TreeNode root=binaryTree.createTree();

        //binaryTree.preOrder(root);
        //binaryTree.inOrder(root);
        //binaryTree.postOrder(root);
        int size=binaryTree.size(root);
        System.out.println("节点的个数: "+ size);

        int LeafNode= binaryTree.getLeafNodeCount(root);
        System.out.println("叶子节点的个数: "+LeafNode);

        int LevelNode=binaryTree.getKLevelNodeCount(root,3);
        System.out.println("第K层节点的个数:"+LevelNode);

        int Height=binaryTree.getHeight(root);
        System.out.println("二叉树的高度:"+Height);
    }
}
